package persistence;

import static org.junit.Assert.*;

import model.Model;

import org.junit.Test;

public class DataManagerTest {

	@Test
	public void saveGradeTest() {
		
		try {
			Model m = new Model();
			
			DataManager dm = new DataManager("jdbc:mysql://localhost/bddlibrarymanager", "root", "", m);
			
			assertEquals("The returned value of saveGrade() should be equal to 1", 1, dm.saveGrade(1, 10.0));
			
		} catch (Exception e) {
			System.err.println("test aborted: " + e);
		}
	}

}
